import requests
from config import headers_web, url_cloud


class EarlyWarningList:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def get_early_warning_list(cls, url_cloud: str, headers=headers_web, params=None):
        """
        summary:接口-查询实验室预约预警名单列表信息
        description:1、实验室预约管理-预约黑名单管理
        :param url_cloud:
        :param headers:
        :param params:
        :return:
        """
        url = url_cloud + "/teachinglaboratoryapi/v1/earlywarninglists"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def post_move_blacklists(cls, url_cloud: str, headers=headers_web, params=None, json=None):
        """
        summary:接口-预警名单移入黑名单接口
        description:1、实验室预约管理-预约黑名单管理
        :param url_cloud:
        :param headers:
        :param params:
        :param json:
        :return:
        """
        url = url_cloud + "/teachinglaboratoryapi/v1/earlywarninglists/moveinblacklists"
        r = requests.post(url=url, params=params, headers=headers, json=json)
        return r
